Page({
    onLoad: function(){
        this.setData({
            slideButtons: [{
              text: '编辑',
              extClass: 'test',
                src: '/page/weui/cell/icon_star.svg', // icon的路径
            },{
              type: 'warn',
              text: '删除',
              extClass: 'test',
                src: '/page/weui/cell/icon_del.svg', // icon的路径
            }],
        });
    },
    slideButtonTap(e) {
      let index = e.detail.index;
      if(index==0) {

      }else if(index==1) {
        wx.showToast({
          title: '删除成功',
          icon: 'success',
          duration: 1500,
          mask: true
        })
      }

    },
    buttonTap(e) {
      wx.navigateTo({
        url: '/pages/form/form',
      })
    },
    addButtonTap(e) {
      wx.navigateTo({
        url: '/pages/add/add',
      })
    }
});